package com.sdry.web.controller;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.sdry.model.hpf.Position;
import com.sdry.model.zc.ChangeNotice;
import com.sdry.service.hpf.PositionService;
import com.sdry.service.zc.ChangeNoticeService;
/**
 * 
 * @ClassName:    MenuController   
 * @Description:  进入菜单页面
 * @Author:       zc   
 * @CreateDate:   2018年9月6日 下午2:45:44   
 * @Version:      v1.0
 */
@Controller
@RequestMapping("zcMenu")
public class ZcMenuController {
	
	@Resource
	private ChangeNoticeService changeNoticeService;
	@Resource
	private PositionService positionService;
	
	/**
	 * 进入控制台
	 * @return
	 */
	@RequestMapping("enterConsolePage")
	public String enterConsolePage(){
		return "/console2";
	}
	/**
	 * 进入生产异常处置单列表页面
	 * @return
	 */
	@RequestMapping(value="/toAbnormalDisposalListPage")
	public ModelAndView toAbnormalDisposalListPage(){
		ModelAndView mv = new ModelAndView();
		List<Position> pList = positionService.listAllPosition();
		mv.addObject("pList", pList);
		mv.setViewName("/zc/quality/abnormalDisposalList");
		return mv;
	}
	
	/**
	 * 进入工艺待办生产异常
	 * @return
	 */
	@RequestMapping(value="/toAbnormalDisposalCraftListPage")
	public ModelAndView toAbnormalDisposalCraftListPage(){
		ModelAndView mv = new ModelAndView();
		List<ChangeNotice> cList = changeNoticeService.listAllChangeNotice();
		mv.addObject("cList", cList);
		List<Position> pList = positionService.listAllPosition();
		mv.addObject("pList", pList);
		mv.setViewName("/zc/quality/abnormalDisposalCraftList");
		return mv;
	}
	
	/**
	 * 进入质量待办生产异常
	 * @return
	 */
	@RequestMapping(value="/toAbnormalDisposalQualityListPage")
	public ModelAndView toAbnormalDisposalQualityListPage(){
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/zc/quality/abnormalDisposalQualityList");
		return mv;
	}
	
	/**
	 * 进入基地经理待办生产异常
	 * @return
	 */
	@RequestMapping(value="/toBaseManagerUpcomingListPage")
	public ModelAndView toBaseManagerUpcomingListPage(){
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/zc/quality/baseManagerUpcomingList");
		return mv;
	}
	
	/**
	 * 进入生产技术部待办生产异常
	 * @return
	 */
	@RequestMapping(value="/toTechnologyUpcomingListPage")
	public ModelAndView toTechnologyUpcomingListPage(){
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/zc/quality/technologyUpcomingList");
		return mv;
	}
	
	/**
	 * 进入生产制造部待办生产异常
	 * @return
	 */
	@RequestMapping(value="/toMakeUpcomingListPage")
	public ModelAndView toMakeUpcomingListPage(){
		ModelAndView mv = new ModelAndView();
		mv.setViewName("/zc/quality/makeUpcomingList");
		return mv;
	}
	/**
     * 进入工艺巡检登记
     * @return
     */
    @RequestMapping("/processInspection")
    public String processInspection(){
        return "/lz/processInspection";
    }
    
    /**
     * 进入工艺巡检记录历史
     * @return
     */
    @RequestMapping("/processInspectionList")
    public String processInspectionList(){
    	return "/lz/processInspectionList";
    }
    
    /**
     * 纺丝车间组件浇铸巡检项管理
     * @return
     */
    @RequestMapping("/processItem")
    public String processItem(){
    	return "/lz/processItem";
    }
    
    /**
     * 膜丝抽检
     * @return
     */
    @RequestMapping("/membraneFilaments")
    public String membraneFilaments(){
    	return "/lz/membraneFilaments";
    }
}
